package com.donglan.pethome.pet.domain;

import com.donglan.pethome.basic.domain.BaseDomain;
import com.donglan.pethome.organization.domain.Shop;
import com.donglan.pethome.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * @Author: zhangdonghui
 * @Date: 2022/2/15 21:42
 */
@Data
public class Pet extends BaseDomain {
    //宠物名(前端传递过来)
    private String name;
    //图片(前端传递过来)
    private String resources;
    //销售价(前端传递过来)
    private BigDecimal saleprice;
    //后台自动生成
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime = new Date();
    //上架时间(默认为空)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime;
    //状态  0 下架     1 上架
    private Integer state = 0;
    //成本价(前端传递过来)
    private BigDecimal costprice;
    //后台自动生成
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime = new Date();
    //宠物类型(前端传递过来)
    private PetType type;
    //后台自动设置进去(登录人对应的店铺)
    private Shop shop;
    //领养人(默认为空)
    private User user;
    //寻主信息对象(前端传递过来)
    private SearchMasterMessage searchMasterMessage;
    //宠物详情(前端传递过来)
    private PetDetail detail = new PetDetail();
}
